package com.city.parking;

public class OrderItem {
	public String name;
	public String contact;
	public String phone;
	public long date;
	public String duration;
	public int price = 0;
	public int state = STATE_CREATE;
	
	public static final int STATE_CREATE = 0;
    public static final int STATE_CANCEL = 1;
    public static final int STATE_PAYED = 2;
    public static final int STATE_FINISHED = 3;

	public OrderItem(String name, int price, long date) {
		this.name = name;
		this.price = price;
		this.date = date;
	}

	public String getStatus() {
	    switch (state) {
        case STATE_CANCEL:
            return "已取消";
        case STATE_PAYED:
            return "已支付";
        case STATE_FINISHED:
            return "已完成";
        default:
            return "待支付";
	    }
	}
}
